gint *minimum_baseline,
gint *natural_baseline,
gpointer unused);
-static gboolean gtk_image_render_contents (GtkCssGadget *gadget,
- GtkSnapshot *snapshot,
- int x,
- int y,
- int width,
- int height,
- gpointer data);
static void gtk_image_style_updated (GtkWidget *widget);
static void gtk_image_finalize (GObject *object);
GTK_WIDGET (image),
gtk_image_get_content_size,
NULL,
- gtk_image_render_contents,
+ NULL,
NULL, NULL);
}
gtk_image_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
- gtk_css_gadget_snapshot (GTK_IMAGE (widget)->priv->gadget,
- snapshot);
-}
-
-static gboolean
-gtk_image_render_contents (GtkCssGadget *gadget,
- GtkSnapshot *snapshot,
- int x,
- int y,
- int width,
- int height,
- gpointer data)
-{
- GtkWidget *widget;
- GtkImage *image;
- GtkImagePrivate *priv;
+ GtkImage *image = GTK_IMAGE (widget);
+ GtkImagePrivate *priv = gtk_image_get_instance_private (image);
+ GtkAllocation allocation;
+ int x, y, width, height;
gint w, h, baseline;
- widget = gtk_css_gadget_get_owner (gadget);
- image = GTK_IMAGE (widget);
- priv = image->priv;
+ gtk_widget_get_allocation (widget, &allocation);
+ x = 0;
+ y = 0;
+ width = allocation.width;
+ height = allocation.height;
_gtk_icon_helper_get_size (priv->icon_helper, &w, &h);
GdkPixbuf *pixbuf = get_animation_frame (image);
gtk_snapshot_render_icon (snapshot, context, pixbuf, x, y);
-
+
g_object_unref (pixbuf);
}
else
gtk_icon_helper_snapshot (priv->icon_helper, snapshot);
gtk_snapshot_offset (snapshot, -x, -y);
}
-
- return FALSE;
}
static void